package com.rd.student.jiaji.class2.shirui.stuentmanagemensystem;

import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        // 添加学生对象到列表中
        List studentList = new LinkedList();
        studentList.add(new Student("金洪宇", "计算机", "Class 1", 17,"6",1));
        studentList.add(new Student("李鑫", "物联网", "Class 1",  22,"66",2));
        studentList.add(new Student("王宇芳", "计算机", "Class 1", 21,"666",3));
        studentList.add(new Student("杜雨坤", "大数据", "Class 2", 18,"6666",4));
        studentList.add(new Student("黄奕鸣", "计算机", "Class 2", 23,"6666",5));
        studentList.add(new Student("石睿", "大数据", "Class 2", 21,"6666",6));
        studentList.add(new Student("苏岩", "大数据", "Class 4", 20,"6666",7));
        Student s1= new Student();
        s1.printMenu();
        while(true) {
            Scanner scanner = new Scanner(System.in);
            int number = scanner.nextInt();
            switch (number) {
                case 1:
                    s1.addStudent(studentList);
                    s1.printMenu();
                    break;
                case 2:
                    s1.removeStudent(studentList);
                    s1.printMenu();
                    break;
                case 3:
                    s1.getClassStudent(studentList);
                    s1.printMenu();
                    break;
                case 4:
                    s1.getMajorStudent(studentList);
                    s1.printMenu();
                    break;
                case 5:
                    s1.getAgeStudent(studentList);
                    s1.printMenu();
                    break;
                case 6:
                    s1.getAllName(studentList);
                    s1.printMenu();
                    break;
                case 7:
                    s1.averAge(studentList);
                    s1.printMenu();
                    break;
                case 8:
                    s1.downOrder(studentList);
                    s1.printMenu();
                    break;
                case 9:
                    s1.upOrder(studentList);
                    s1.printMenu();
                    break;
                case 10:
                    s1.getLimitAge(studentList);
                    s1.printMenu();
                    break;
                case 11:
                    s1.printMenu();
                    break;
                case 12:
                    s1.printStudent(studentList);
                    s1.printMenu();
                    break;
                default:
                    System.out.println("请输入正确的编号");
                    break;
            }
        }
    }
}
